Current Location: Home> Function Categories> log

log

Natural logarithm
Name:log
Category:math
Programming Language:php
One-line Description:Natural logarithm.

Definition and usage

log() returns natural logarithm.

Example

 <?php
echo lcg_value ( ) ;
?>

Try it yourself

grammar

 log ( x , base )
parameter describe
x Required. A number.
base Optional. If this parameter is specified, log base x is returned.

illustrate

If an optional parameter base is specified, log() returns log base x , otherwise log() returns the natural logarithm of parameter x .

Note: The parameter base is available since PHP 4.3.0. You can calculate any logarithm with n based on b, but in fact, you use the mathematical equation: logb(n) = log(n)/log(b), where log is a natural logarithm.

Similar Functions
  • Antihyperbolic tangent atanh

    atanh

    Antihyperbolictangen
  • Convert decimal to hexadecimal dechex

    dechex

    Convertdecimaltohexa
  • Hyperbolic tangent tanh

    tanh

    Hyperbolictangent
  • Natural logarithm log

    log

    Naturallogarithm
  • Hyperbolic cosine cosh

    cosh

    Hyperboliccosine
  • Calculate the index of e exp

    exp

    Calculatetheindexofe
  • Find the maximum value max

    max

    Findthemaximumvalue
  • Antihyperbolic cosine acosh

    acosh

    Antihyperboliccosine
Popular Articles